<%@ page pageEncoding="UTF-8" %>
<!doctype html>
<html lang="zh-cmn">
<head>
    <title>Document</title>
    <%@include file="/WEB-INF/jsp/header.jsp"%>
</head>
<body>

    <div class="container-fluid">
        <div class="text-center" style="margin-bottom: 10px;">
            <span class="h3">库存信息详情</span>
        </div>
        <div class="panel panel-success">
            <div class="panel-heading">
                <h3 class="panel-title">条件查询</h3>
            </div>
            <div class="panel-body">
                <form action="" id="detailForm" class="form-inline">
                    <div class="form-group">
                        <label for="">
                            生产批号:
                        </label>
                        <input type="text" name="stoLotnum" class="form-control" />
                    </div>
                    <div class="form-group">
                        <label for="">
                            是否过期:
                        </label>
                        <select name="guoQi" id="" class="form-control" style="width: 135px;">
                            <option value="-1">全部</option>
                            <option value="1">已过期</option>
                            <option value="2">未过期</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="">
                            入库时间:
                        </label>
                        <input type="text" class="form-control" name="stoPutindateStart"/>
                        <input type="text" class="form-control" name="stoPutindateEnd"/>
                    </div>

                    <div class="form-group" style="margin-top: 10px;">
                        <label for="">
                            生产日期:
                        </label>
                        <input type="text" class="form-control" name="stoMfgStart"/>
                        <input type="text" class="form-control" name="stoMfgEnd"/>
                    </div>
                    <div class="form-group" style="margin-top: 10px;">
                        <label for="">
                            库存数量:
                        </label>
                        <input type="text" class="form-control" name="countStart"/>
                        <input type="text" class="form-control" name="countEnd"/>
                    </div>
                    <input type="hidden" value="${drugNum}" name="drugNum" />
                    <button class="btn btn-info" type="button" onclick="searchBudrugNum()" style="margin-top: 10px;">搜索</button>
                </form>
            </div>
        </div>
        <table  id="drugstockTable"
                data-toggle="table"
                data-url="${ctx}/stock/searchByDrugNum?drugNum=${drugNum}"
                data-toolbar="#toolbar"
                data-striped="true"
                data-pagination="true"
                data-side-pagination="server"
                data-page-list="[5,10,15,30]"
                data-smart-display="true"
                data-click-to-select="true"
        >
            <thead>
            <tr>

                <th data-field="drugNum">药品编号</th>
                <th data-field="druginfo.drugName">药品名称</th>
                <th data-field="stoPutindate">入库日期</th>
                <th data-field="stoLotnum">批号</th>
                <th data-field="stoMfg">生产日期</th>
                <th data-field="stoValiddate">有效日期</th>
                <th data-field="stoPcs">库存数量</th>
                <th data-field="stoPrimecost">进价</th>
                <th data-field="stoPresell">预售价</th>
                <th data-formatter="optEvent2" data-events="optEvents2">操作</th>
            </tr>
            </thead>
        </table>
    </div>
<div id="edit">
    <form action="" id="editForm" class="form-horizontal">
        <div class="form-group">
            <label for="" class="col-md-2 control-label">药品名称:</label>
            <div class="col-md-8">
                <input type="hidden" name="stoNum" />
                <input type="hidden" name="createdBy" />
                <input type="hidden" name="creationDate" />
                <input type="hidden" name="stoId" />
                <input type="hidden" name="drugNum" />
                <input type="text" disabled="disabled" name="drugName" class="form-control" />
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-md-2 control-label">批号:</label>
            <div class="col-md-8">
                <input type="text" name="stoLotnum"  class="form-control" />
            </div><span style="color: red"></span>
        </div>
        <div class="form-group">
            <label for="" class="col-md-2 control-label">入库日期:</label>
            <div class="col-md-8">
                <input type="text" name="stoPutindate"  class="form-control" />
            </div><span style="color: red"></span>
        </div>

        <div class="form-group">
            <label for="" class="col-md-2 control-label">生产日期:</label>
            <div class="col-md-8">
                <input type="text" name="stoMfg" class="form-control" />
            </div><span style="color: red"></span>
        </div>
        <div class="form-group">
            <label for="" class="col-md-2 control-label">有效日期:</label>
            <div class="col-md-8">
                <input type="text" name="stoValiddate" class="form-control" />
            </div><span style="color: red"></span>
        </div>
        <div class="form-group">
            <label for="" class="col-md-2 control-label">库存数量:</label>
            <div class="col-md-8">
                <input type="number" name="stoPcs" class="form-control" />
            </div><span style="color: red"></span>
        </div>
        <div class="form-group">
            <label for="" class="col-md-2 control-label">进价:</label>
            <div class="col-md-8">
                <input type="text" name="stoPrimecost" class="form-control" />
            </div><span style="color: red"></span>
        </div>
        <div class="form-group">
            <label for="" class="col-md-2 control-label">预售价:</label>
            <div class="col-md-8">
                <input type="text" name="stoPresell" class="form-control" />
            </div><span style="color: red"></span>
        </div>
    </form>
</div>
<%@include file="/WEB-INF/jsp/footer.jsp"%>
<script src="${ctx}/res/js/Drugstock.js"></script>
</body>
</html>
